package com.wondertek.poms.dao.po;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Set;

/**
 * <p><b>PcPrdInfoRule Description:</b> PcPrdInfoRule po类 ; 商品包规则表</p>
 *
 * @author 窦再兴
 * <p><b>DATE</b> 2019-08-12 11:20:52</p>
 */
@Data
@Entity
@Table(name = "PRD_RULE")
@DynamicUpdate
@DynamicInsert
@Proxy(lazy = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PrdInfoRule implements IRulePo {
    /**
     * <b>Fields</b> serialVersionUID :
     */
    private static final long serialVersionUID = -2083251131829135326L;
    
    @Id
	@Column(name = "PRD_RULE_ID")
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "PRD_RULE_SEQ")
	@SequenceGenerator(name = "PRD_RULE_SEQ", allocationSize = 1, sequenceName = "PRD_RULE_SEQ")
    private Long prdRuleId;
    
    @Column(name = "COPYRIGHT_CPID")
	private Long copyRightCpId;
    
    @Column(name = "FIRST_CLASSIFY")
	private String firstClassify;
	/**
     * <b>Fields</b> prdInfoId : 商品包ID 外键
     */
    @Column(name = "prd_info_id")
    private Long prdInfoId;
    
    @Column(name = "COPYRIGHT_SCOPE")
	private String copyRightScope;
    
    @Column(name = "OUTPUT")
	private Integer output;
    
    @Column(name = "FREE_TYPE")
	private String freeType;
    
    @Column(name = "IS_PRD_SEL")
	private Integer isprdSel;// 1-待选，2-已选，3-释放, 4-限制
	
	@Column(name = "COPYTYPE_TAL")
	private String copytypeTal;
	
	@Column(name = "ASSIST")
	private String assist; // 辅助分类
	
	@Column(name = "OPTIMAL")
	private Integer optimal; // 0 是 1 否
	
	@Column(name = "NAME_FLAG")
	private Integer nameFlag; // 0 是 1 否
	
	@Column(name = "CATEGORY")
	private String category; // 1-视频;2-音频;3-图文
	
	@Column(name = "ONLINE_FROM")
	private Integer onlineFrom;// 上线时间，从..
	
	@Column(name = "ONLINE_TO")
	private Integer onlineTo;// 上线时间，到..
	
	@Column(name = "ONLINE_TYPE")
	private Integer onlineType;// 上线时间，1天2月3年
	
	@Column(name = "FIRST_PLAY_FROM")
	private Integer firstPlayFrom;// 首播时间，从..
	
	@Column(name = "FIRST_PLAY_TO")
	private Integer firstPlayTo;// 首播时间，到..
	
	@Column(name = "FIRST_PLAY_TYPE")
	private Integer firstPlayType;// 首播时间，1天2月3年
	
	@Column(name = "FIRST_RUN_FROM")
	private Integer firstRunFrom;// 首映时间，从..
	
	@Column(name = "FIRST_RUN_TO")
	private Integer firstRunTo;// 首映时间，到..
	
	@Column(name = "FIRST_RUN_TYPE")
	private Integer firstRunType;// 首映时间，1天2月3年
	
	@Column(name = "TARGET_PRD_INFO_ID")
	private Long targetPrdInfo;// 目标产品包,仅释放规则有效
	
	@Column(name = "COPYRIGHT_TYPE")
	private String copyrightType;// 1-强版权，2-弱版权
	
	@Column(name = "NEED_DRM")
	private String needDRM;// 内容数字版权加密保护技术 0:是;1:否;null:否
	
	@Column(name = "HAS_VIDEO")
	private String hasVideo;// 是否包含媒体文件
	
	@Column(name = "RECOMMENDATION")
	private String recommendation; // 推荐标签
	
	@Column(name = "CONTENT_LEVEL")
	private String contentLevel; // 内容评级(S、A+、A、B+、B、C)
	
	@Column(name = "FORM_TYPE")
	private String formType;
	
	@Column(name = "COPYRIGHT_AREA")
	private String copyRightArea; // 枚举值：1-内地；2-香港；3-澳门；4-台湾；5-海外；6-任何区域；11-江苏；20-广东
	
	@Column(name = "MEDIA_USAGE_CODE")
	private String mediaUsageCode;// 码率,多个以英文逗号分隔
	
	@Column(name = "AUTHORI_ZATION_WAY")
	private String authorizationWay;// 1、单片授权2、集体授权3、频道授权4、三方SDK播放授权

	@Transient
	private Set<PrdRuleSecondClassify> secondClassifys;
	
    public static void putTimeAndUser(PrdInfoRule pcPrdInfoRule) {
    }
}